package com.designpatterns.command.command.garagedoor;

import com.designpatterns.command.command.Command;
import com.designpatterns.command.entity.GarageDoor;

/**
 * @author Brook
 */
public class GarageDoorDownCommand implements Command {

    GarageDoor garageDoor;

    public GarageDoorDownCommand(GarageDoor garageDoor) {
        this.garageDoor = garageDoor;
    }

    @Override
    public void excute() {
        garageDoor.down();
    }

    @Override
    public void undo() {
        garageDoor.open();
    }
}
